package Final;

import java.util.Scanner;
public class test14 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        CellPhone c1 = new CellPhone(sc.next(),sc.nextInt(),sc.nextInt(),sc.nextInt());
        CellPhone c2 = new CellPhone(sc.next(),sc.nextInt(),sc.nextInt(),sc.nextInt());

        System.out.println(c1.equals(c2));
        System.out.println(c1);
        System.out.println(c2);
    }
}

/* 你的代码将被嵌在这里 */
class CellPhone{
    String model;
    int memory;
    int storage;
    int price;

    public CellPhone(String model, int memory, int storage, int price) {
        this.model = model;
        this.memory = memory;
        this.storage = storage;
        this.price = price;
    }
    public String toString() {
        return "CellPhone [model:" + model + ", memory:" + memory + ", storage:" + storage + ", price:" + price + "]";
    }

    @Override
    public boolean equals(Object obj) {
        CellPhone cellPhone = (CellPhone) obj;
        String model1 = cellPhone.model;
        int memory1 = cellPhone.memory;
        int storage1 = cellPhone.storage;
        int price1 = cellPhone.price;
        if (model1.equals(model) && memory1 == memory && storage1 == storage && price1 == price){
            return true;
        }
        return false;
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }
}